package com.westar.core.init;

import com.westar.core.services.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
public class InitDataApplicationRunner implements ApplicationRunner{
    @Autowired
    private UserInfoService userInfoService;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        //初始化管理员账号
        userInfoService.initAdminAccount();
        //初始化用户的md5
        userInfoService.initUserPasswd();
    }
}
